﻿using System;
using DapperExtensions.Mapper;
using ZilLion.Service.Crm.ModelBase.EntityBase.Identity;

namespace ZilLion.Service.WechatService.Domain.WebApiEntity.WechatCardModel
{
    public class AccBindingCardYwcore: ResponseResultInfo
    {
        /// <summary>
        ///  CRM业务操作记录流水号（服务端生成）
        /// </summary>
        public string oprsno { get; set; }

        /// <summary>
        ///  实体卡卡号
        /// </summary>
        public string cardno { get; set; }

        /// <summary>
        ///  实体卡折扣类别识别码
        /// </summary>
        public string zklbsbm { get; set; }

        /// <summary>
        ///  实体卡折扣类别id（服务端读取缓存获得）
        /// </summary>
        public int zklbid { get; set; }

        /// <summary>
        ///  实体卡卡种识别码
        /// </summary>
        public string kzsbm { get; set; }

        /// <summary>
        ///  实体卡卡种id（服务端读取缓存获得）
        /// </summary>
        public int kzid { get; set; }

        /// <summary>
        ///  微信openid+"|"+ 服务号id(提供的绑定依据)
        /// </summary>
        public string wxopenidappid { get; set; }

        /// <summary>
        ///  申请时间
        /// </summary>
        public DateTime? oprtime { get; set; }

    }

    public class AccBindingCardMapper : ClassMapper<AccBindingCardYwcore>
    {
        public AccBindingCardMapper()
        {
            Table("#ywcore");
            Map(f => f.oprsno).Column("oprsno");
            Map(f => f.cardno).Column("cardno");
            Map(f => f.zklbsbm).Column("zklbsbm");
            Map(f => f.zklbid).Column("zklbid");
            Map(f => f.kzsbm).Column("kzsbm");
            Map(f => f.kzid).Column("kzid");
            Map(f => f.wxopenidappid).Column("wxopenidappid");
            Map(f => f.oprtime).Column("oprtime");
        }
    }
}
